﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LookupContactManager.ascx.cs"
    Inherits="ServicesDirectory.UserControl.LookupContactManager" %>
<style type="text/css">
    .listContact
    {
        margin: 0px 5px 0px 5px;
        border: 1px solid black;
        background: #f4f9fb;
        height: 31px;
    }
    .ButonContact
    {
        margin-left: 5px;
    }
</style>

<script type="text/javascript">

function SetUniqueRadioButton( current)
{

        for(var i = 0; i < document.forms[0].elements.length; i++) {
        	var elm = document.forms[0].elements[i];
        	if (elm.type == 'radio')
        {
        
        elm.checked = false;
        
        }
        }
	
	current.checked = true;
}
</script>

<div class="bgPopup">
    <div class="TitleManarer">
        Search Contact
    </div>
    <div class="listContact">
        <div class="spaceManager">
        </div>
        <div class="titleCol1">
            FirstName:</div>
        <div class="titleCol2">
            <asp:TextBox runat="server" ID="txtFirstName" Width="99%"></asp:TextBox></div>
        <div class="titleCol1">
            SurName:</div>
        <div class="titleCol2">
            <asp:TextBox runat="server" ID="txtSurname" Width="99%"></asp:TextBox>
        </div>
    </div>
    <div class="spaceManager">
    </div>
    <div class="ButonContact">
        <asp:Button runat="server" ID="btnSearchContact" Text="Search Contact" Font-Size="XX-Small"
            OnClick="SearchContact_Click" Height="21px" />
        <asp:Button runat="server" Width="60px" ID="btnNone" Text="None" Font-Size="XX-Small"
            OnClick="None_Click" />
        <asp:Button runat="server" Width="60px" ID="btnClear" Text="Clear" Font-Size="XX-Small" />
    </div>
    <div class="spaceManager">
    </div>
    <asp:CheckBox runat="server" ID="chkInactive" Text="Include In-Active Contact?" Font-Size="10pt"
        AutoPostBack="True" OnCheckedChanged="Inactive_CheckedChanged" />
    <div class="spaceManager">
    </div>
    <div class="contentGrid">
        <div class="hearderGrid">
            <div class="ContactHeaderCol0">
                &nbsp;
            </div>
            <div class="ContactHeaderCol1">
                ContactName</div>
            <div class="ContactHeaderCol2">
                Mobile Phone</div>
            <div class="ContactHeaderCol3">
                Email</div>
            <div class="ContactHeaderCol4">
                IsActive</div>
        </div>
        <asp:Repeater runat="server" ID="rptContacts" OnItemDataBound="Contacts_ItemDataBound">
            <ItemTemplate>
                <asp:HiddenField runat="server" ID="hdContactId" Value='<%#Eval("ContactID") %>' />
                <div class="rowGrid">
                    <div class="ContactContentCol0">
                        <asp:RadioButton runat="server" GroupName="ClickOne" ID="rbtSelect" /></div>
                    <div class="ContactContentCol1">
                        <%#Eval("FirstName") %>
                        &nbsp;
                        <%#Eval("SurName") %></div>
                    <div class="ContactContentCol2">
                        <%#Eval("MobilePhone") %></div>
                    <div class="ContactContentCol3">
                        <%#Eval("Email") %></div>
                    <div class="ContactContentCol4">
                     <asp:Label runat="server" ID="lblIsactive" Text='<%#Eval("IsActive") %>'></asp:Label>   </div>
                </div>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <asp:HiddenField runat="server" ID="hdContactId" Value='<%#Eval("ContactID") %>' />
                <div class="alterRowGrid">
                    <div class="ContactContentCol0">
                        <asp:RadioButton runat="server" GroupName="ClickOne" ID="rbtSelect" /></div>
                    <div class="ContactContentCol1">
                        <%#Eval("FirstName") %>
                        &nbsp;
                        <%#Eval("SurName") %></div>
                    <div class="ContactContentCol2">
                        <%#Eval("MobilePhone") %></div>
                    <div class="ContactContentCol3">
                        <%#Eval("Email") %></div>
                    <div class="ContactContentCol4">
                       <asp:Label runat="server" ID="lblIsactive" Text='<%#Eval("IsActive") %>'></asp:Label> </div>
                </div>
            </AlternatingItemTemplate>
        </asp:Repeater>
        <asp:HiddenField runat="server" ID="currentContactId" />
    </div>
    <div class="PagingList">
        <span>
            <asp:Button runat="server" CssClass="backAllList" ID="btnBackAll" OnClick="BackAll_Click" />
        </span><span>
            <asp:Button runat="server" CssClass="backList" ID="btnBacklist" OnClick="Backlist_Click" /></span>
        <span style="padding-left: 5px;">Page</span> <span style="padding-left: 5px;">
            <asp:TextBox Text="1" runat="server" Width="20px" ID="tbPageNumber"></asp:TextBox></span>
        <span>of</span> <span>
            <asp:Label runat="server" Text="1" ID="lblTotalPage"></asp:Label></span> <span>
                <asp:Button runat="server" CssClass="nextAll" ID="btnNextAll" OnClick="NextAll_Click" />
            </span><span>
                <asp:Button runat="server" CssClass="nextList" ID="btnNext" OnClick="Next_Click" />
            </span>
    </div>
    <div class="spaceManager">
    </div>
    <div class="ButonContact">
        <asp:Button runat="server" Width="60px" ID="btnSelect" Text="Select" Font-Size="XX-Small"
            OnClick="BtnSelect_Click" />
        <asp:Button runat="server" Width="60px" ID="btnClose" Text="Close" Font-Size="XX-Small"
            OnClick="Close_Click" />
        &nbsp;
        <asp:Label runat="server" ID="lblMessage"></asp:Label>
    </div>
    <div class="spaceManager">
    </div>
</div>
